<?php
/* 
$conection = $mysql_connect("localhost","root","");
mysql_select_db("db_fotos");
*/
/* function conectar(){
 if (!($link=mysql_connect("localhost","root",""))){
      echo "Error conectando a la base de datos.";
      exit();
   }
   if (!mysql_select_db("db_fotos",$link)){
      echo "Error seleccionando la base de datos.";
      exit();
   }
   return $link;
     
	$var = 'hola';
    $result=mysql_query("select id from tbl_fotos where nombre='$var'",$link);
    while($row = mysql_fetch_array($result)) {
	echo($row['id']);
    } 
}	 */



function Conectarse(){
   if (!($link=mysql_connect("localhost","root","")))  {
      echo'error';
      exit();
      
   }
   if (!mysql_select_db("summnum",$link)){      
      echo'error';
      exit();
   }
   return $link;
}
?>